<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GtkCellRendererSpin</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GTK+ 2 Reference Manual">
<link rel="up" href="TreeWidgetObjects.html" title="Tree, List and Icon Grid Widgets">
<link rel="prev" href="GtkCellRendererProgress.html" title="GtkCellRendererProgress">
<link rel="next" href="GtkCellRendererText.html" title="GtkCellRendererText">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="GtkCellRendererProgress.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="TreeWidgetObjects.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GTK+ 2 Reference Manual</th>
<td><a accesskey="n" href="GtkCellRendererText.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#GtkCellRendererSpin.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#GtkCellRendererSpin.description" class="shortcut">Description</a>
                   | 
                  <a href="#GtkCellRendererSpin.object-hierarchy" class="shortcut">Object Hierarchy</a>
                   | 
                  <a href="#GtkCellRendererSpin.properties" class="shortcut">Properties</a>
</td></tr>
</table>
<div class="refentry">
<a name="GtkCellRendererSpin"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GtkCellRendererSpin.top_of_page"></a>GtkCellRendererSpin</span></h2>
<p>GtkCellRendererSpin — Renders a spin button in a cell</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="GtkCellRendererSpin.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;gtk/gtk.h&gt;

struct              <a class="link" href="GtkCellRendererSpin.html#GtkCellRendererSpin-struct" title="struct GtkCellRendererSpin">GtkCellRendererSpin</a>;
<a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer"><span class="returnvalue">GtkCellRenderer</span></a> *   <a class="link" href="GtkCellRendererSpin.html#gtk-cell-renderer-spin-new" title="gtk_cell_renderer_spin_new ()">gtk_cell_renderer_spin_new</a>          (<em class="parameter"><code><span class="type">void</span></code></em>);
</pre>
</div>
<div class="refsect1">
<a name="GtkCellRendererSpin.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
   +----<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
         +----<a class="link" href="GtkObject.html" title="GtkObject">GtkObject</a>
               +----<a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer">GtkCellRenderer</a>
                     +----<a class="link" href="GtkCellRendererText.html" title="GtkCellRendererText">GtkCellRendererText</a>
                           +----GtkCellRendererSpin
</pre>
</div>
<div class="refsect1">
<a name="GtkCellRendererSpin.properties"></a><h2>Properties</h2>
<pre class="synopsis">
  "<a class="link" href="GtkCellRendererSpin.html#GtkCellRendererSpin--adjustment" title='The "adjustment" property'>adjustment</a>"               <a class="link" href="GtkAdjustment.html" title="GtkAdjustment"><span class="type">GtkAdjustment</span></a>*        : Read / Write
  "<a class="link" href="GtkCellRendererSpin.html#GtkCellRendererSpin--climb-rate" title='The "climb-rate" property'>climb-rate</a>"               <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a>               : Read / Write
  "<a class="link" href="GtkCellRendererSpin.html#GtkCellRendererSpin--digits" title='The "digits" property'>digits</a>"                   <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>                 : Read / Write
</pre>
</div>
<div class="refsect1">
<a name="GtkCellRendererSpin.description"></a><h2>Description</h2>
<p>
<a class="link" href="GtkCellRendererSpin.html" title="GtkCellRendererSpin"><span class="type">GtkCellRendererSpin</span></a> renders text in a cell like <a class="link" href="GtkCellRendererText.html" title="GtkCellRendererText"><span class="type">GtkCellRendererText</span></a> from
which it is derived. But while <a class="link" href="GtkCellRendererText.html" title="GtkCellRendererText"><span class="type">GtkCellRendererText</span></a> offers a simple entry to
edit the text, <a class="link" href="GtkCellRendererSpin.html" title="GtkCellRendererSpin"><span class="type">GtkCellRendererSpin</span></a> offers a <a class="link" href="GtkSpinButton.html" title="GtkSpinButton"><span class="type">GtkSpinButton</span></a> widget. Of course,
that means that the text has to be parseable as a floating point number.
</p>
<p>
The range of the spinbutton is taken from the adjustment property of the
cell renderer, which can be set explicitly or mapped to a column in the
tree model, like all properties of cell renders. <a class="link" href="GtkCellRendererSpin.html" title="GtkCellRendererSpin"><span class="type">GtkCellRendererSpin</span></a>
also has properties for the climb rate and the number of digits to
display. Other <a class="link" href="GtkSpinButton.html" title="GtkSpinButton"><span class="type">GtkSpinButton</span></a> properties can be set in a handler for the
start-editing signal.
</p>
<p>
The <a class="link" href="GtkCellRendererSpin.html" title="GtkCellRendererSpin"><span class="type">GtkCellRendererSpin</span></a> cell renderer was added in GTK+ 2.10.
</p>
</div>
<div class="refsect1">
<a name="GtkCellRendererSpin.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GtkCellRendererSpin-struct"></a><h3>struct GtkCellRendererSpin</h3>
<pre class="programlisting">struct GtkCellRendererSpin;</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-cell-renderer-spin-new"></a><h3>gtk_cell_renderer_spin_new ()</h3>
<pre class="programlisting"><a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer"><span class="returnvalue">GtkCellRenderer</span></a> *   gtk_cell_renderer_spin_new          (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Creates a new <a class="link" href="GtkCellRendererSpin.html" title="GtkCellRendererSpin"><span class="type">GtkCellRendererSpin</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="GtkCellRendererSpin.html" title="GtkCellRendererSpin"><span class="type">GtkCellRendererSpin</span></a>
</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.10</p>
</div>
</div>
<div class="refsect1">
<a name="GtkCellRendererSpin.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GtkCellRendererSpin--adjustment"></a><h3>The <code class="literal">"adjustment"</code> property</h3>
<pre class="programlisting">  "adjustment"               <a class="link" href="GtkAdjustment.html" title="GtkAdjustment"><span class="type">GtkAdjustment</span></a>*        : Read / Write</pre>
<p>
The adjustment that holds the value of the spinbutton.
This must be non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for the cell renderer to be editable.
</p>
<p class="since">Since 2.10</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkCellRendererSpin--climb-rate"></a><h3>The <code class="literal">"climb-rate"</code> property</h3>
<pre class="programlisting">  "climb-rate"               <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a>               : Read / Write</pre>
<p>
The acceleration rate when you hold down a button.
</p>
<p>Allowed values: &gt;= 0</p>
<p>Default value: 0</p>
<p class="since">Since 2.10</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkCellRendererSpin--digits"></a><h3>The <code class="literal">"digits"</code> property</h3>
<pre class="programlisting">  "digits"                   <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>                 : Read / Write</pre>
<p>
The number of decimal places to display.
</p>
<p>Allowed values: &lt;= 20</p>
<p>Default value: 0</p>
<p class="since">Since 2.10</p>
</div>
</div>
<div class="refsect1">
<a name="GtkCellRendererSpin.see-also"></a><h2>See Also</h2>
<p>
<a class="link" href="GtkCellRendererText.html" title="GtkCellRendererText"><span class="type">GtkCellRendererText</span></a>, <a class="link" href="GtkSpinButton.html" title="GtkSpinButton"><span class="type">GtkSpinButton</span></a>
</p>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>